package com.ruoyi.trackapply.domain;

import cn.hutool.json.JSONUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Objects;

/**
 * @Description 不同磁暴大气模式定轨效应评估
 * @Author zw
 **/
@Data
@ApiModel( description = "定轨效应评估入参")
public class OrbitDeterminationParam {

    @NotNull(message = "年份不能为空")
    @ApiModelProperty("年份yyyy")
    private Integer year;

    @NotBlank(message = "地磁条件不能为空")
    @ApiModelProperty("地磁条件：period_of_quiet_magnetic_storm 代表地磁平静期，period_of_weak_magnetic_storm 为弱磁暴期，periods_of_severe_magnetic_storms 为强磁暴期，单选")
    private String magneticLevel;

    @NotBlank(message = "情景不能为空")
    @ApiModelProperty("情景")
    private String scene;

    @NotBlank(message = "目标编号不能为空")
    @ApiModelProperty("目标编号")
    private String sateName;

//    @NotBlank(message = "风场模型不能为空")
//    @ApiModelProperty("风场模型")
    private String windModel;

    @NotEmpty(message = "模型不能为空") // 确保列表不为null且至少有一个元素
    @Valid // 开启嵌套校验
    @ApiModelProperty("模型，多选： 数组")
    private List<String> model;

    @ApiModelProperty("通讯ID,计算评估需要推送进度")
    @NotBlank(message = "通讯ID不能为空")
    private String sseId;

    @Override
    public String toString() {
        return "OrbitDeterminationParam{" +
                "year=" + year +
                ", magneticLevel='" + magneticLevel + '\'' +
                ", scene='" + scene + '\'' +
                ", sateName='" + sateName + '\'' +
                ", windModel='" + windModel + '\'' +
                ", model=" + JSONUtil.toJsonStr(model) +
                '}';
    }
}
